package com.example.demo.Service;

import com.example.demo.Entity.Friend;
import com.example.demo.Repository.FriendRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class FriendService {

    @Autowired
    private FriendRepository friendRepository;

    public List<Friend> getFriendsByUserId(Long userId) {
        return friendRepository.findByUser_Id(userId);
    }
}